import { buildColumns } from '@/utils'

export default function useTableColumn() {
  const columns = computed(() =>
    buildColumns([
      {
        title: '版本号',
        dataIndex: 'version',
        width: 170,
        slotName: 'version',
        sortable: sortableSettings
      },
      {
        title: '文件大小',
        slotName: 'file_size',
        width: 170,
        dataIndex: 'file_size'
      },

      {
        title: '版本说明',
        dataIndex: 'imprint',
        disableTooltip: true,
        slotName: 'imprint'
      },

      {
        title: '上传时间',
        dataIndex: 'created_at',
        width: 240,
        sortable: sortableSettings,
        format: 'date-time'
      },
      {
        title: '操作',
        width: 200,
        slotName: 'action',
        cellClass: 'actions-cell'
      }
    ])
  )
  return {
    columns
  }
}
